#include <graphics/GLSLManager.h>

namespace ne
{
    template<> GLSLManager* Singleton<GLSLManager>::mpInstance = 0;

    GLSLManager::GLSLManager()
    {
        mResourceType = "GLSLProgram";
        std::cout << "Construct GLSL Manager\n";
    }

    GLSLManager::~GLSLManager()
    {
        std::cout << "Disconstruct GLSL Manager\n";
    }

    GLSLManager& GLSLManager::GetSingleton()
    {
        assert(mpInstance);
        return *mpInstance;
    }

    GLSLManager* GLSLManager::GetSingletonPtr()
    {
        return mpInstance;
    }

    Resource* GLSLManager::createImplement(const uint64_t id,
                                           const std::string &name,
                                           const std::string &fileName,
                                           const bool isManual,
                                           ManualResourceLoader *pLoader)
    {
        return new GLSLProgram(this, id, name, fileName, isManual, pLoader);
    }
}
